package com.wsj.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.wsj.dao.IDirectSeedDao;
import com.wsj.service.IDirectSeedServ;
import com.wsj.util.exception.BusinessException;
import com.wsj.util.page.PageResultSet;
import com.wsj.web.subclass.displayBean.directSeed.DirectSeedExtendBean;
import com.wsj.web.vo.homeSite.DirectSeed;

public class DirectSeedServImpl implements IDirectSeedServ {
	
	private IDirectSeedDao directSeedDaoImpl;

	public boolean add(DirectSeed directSeed) throws BusinessException {

		this.directSeedDaoImpl.add(directSeed);
		return true;
	}

	public boolean delete(Integer id) throws BusinessException {
		// TODO Auto-generated method stub
		this.directSeedDaoImpl.delete(id);
		return true;
	}

	public DirectSeed getDirectSeedById(Integer id) throws BusinessException {
		// TODO Auto-generated method stub
		DirectSeed directSeed=null;
		directSeed=this.directSeedDaoImpl.getDirectSeedById(id);
		return directSeed;
	}

	public PageResultSet loadDirectSeedByExtendBean(DirectSeedExtendBean directSeedExtendBean) throws BusinessException {
		// TODO Auto-generated method stub
		PageResultSet pageResultSet=null;
		pageResultSet=this.directSeedDaoImpl.loadDirectSeedByExtendBean(directSeedExtendBean);
		return pageResultSet;
	}

	public List loadDirectSeedList() throws BusinessException {
		// TODO Auto-generated method stub
		List list=new ArrayList();
		list=this.directSeedDaoImpl.loadDirectSeedList();
		return list;
	}

	public boolean update(DirectSeed directSeed) throws BusinessException {
		// TODO Auto-generated method stub
		
		this.directSeedDaoImpl.update(directSeed);
		return true;
	}

	public IDirectSeedDao getDirectSeedDaoImpl() {
		return directSeedDaoImpl;
	}

	public void setDirectSeedDaoImpl(IDirectSeedDao directSeedDaoImpl) {
		this.directSeedDaoImpl = directSeedDaoImpl;
	}

	public List getTopDirectSeedByHistory(int top) throws BusinessException {
		// TODO Auto-generated method stub
		List list=this.directSeedDaoImpl.getTopDirectSeedByHistory(top);
		
		return list;
	}

	public List getTopDirectSeedByDirectClassName(String lanmuname, Integer top) throws BusinessException {
		// TODO Auto-generated method stub
		
		List list=this.directSeedDaoImpl.getTopDirectSeedByDirectClassName(lanmuname,top);
		return list;
	}

	public List getTopByDclassName(String lanmuname, Integer top) throws BusinessException {
		// TODO Auto-generated method stub
		
		List list=this.directSeedDaoImpl.getTopByDclassName(lanmuname,  top);
		return list;
	}

	public List getDirectSeedByparentId(Integer id, Integer top) throws BusinessException {
		// TODO Auto-generated method stub
		List list=this.directSeedDaoImpl.getDirectSeedByparentId(id, top);
		
		return list;
	}

}









